class Duck:
    def quack(self):
        return "Quack, quack!"

class Person:
    def quack(self):
        return "I'm quacking like a duck!"

# 鸭子类型的体现
def make_it_quack(something):
    print(something.quack())

duck = Duck()
person = Person()

make_it_quack(duck)   # 输出: Quack, quack!
make_it_quack(person) # 输出: I'm quacking like a duck!